/**
 * 菜单管理JS
 */
layui.use(['table','jquery','layer','form'], function(){
    var table = layui.table,
        $ = layui.$,
        layer = layui.layer,
        form = layer.form;
    table.render({
        elem:'#menuList'
        ,height:'380'
        ,url: $("#contextPath").val() + "/system/menu/queryMenuList" //数据接口
        ,page: true //开启分页
        ,id:'menuList'
        ,cols:[[ //标题栏
            {type:'checkbox',field:'id'},
            {type:'numbers',title:"序号"},
            {field:'name',title:'名称',align:'center',width:'400'},
            {field:'link',title:'链接',align:'center',width:'200'},
            {field:'permission',title:'权限',align:'center',width:'200'},
            {field:'type',title:'类型',align:'center',width:'80'}, //标识是菜单还是操作按钮
            {field:'status',title:'状态',align:'center',width:'80'}, //标识正常还是禁用
            {fixed: 'right', title:'操作' , width:160, align:'center', toolbar: '#menuBar'}
        ]]
    });
});